import axios from "axios";


const instance = axios.create({
  baseURL:'http://152.136.185.210:7878/api/m5',
  timeout: 5000
})


instance.interceptors.request.use(
  config => {
    return config
  }, error => {
    // 对请求错误做些什么
    return Promise.reject(error);
  })

instance.interceptors.response.use(
  response => {
    return response.data
  }, error => {
    return Promise.reject(error)
  })

export function request(config) {
  return instance(config)
}


